package com.lyk.read.book.ui.detail

import android.widget.ImageView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lyk.common.manager.GlideManager
import com.lyk.read.book.R
import com.lyk.read.book.bean.DetailItemBean

/**
 * Created by LianYongKe on 2024/3/15.
 */
class DetailAdapter(list: MutableList<DetailItemBean>):
    BaseQuickAdapter<DetailItemBean, BaseViewHolder>(R.layout.item_detail, list) {


    override fun convert(holder: BaseViewHolder, item: DetailItemBean) {
        holder.setText(R.id.detailItemTitle, item.desc)

        val image = holder.getView<ImageView>(R.id.detailItemImg)
        GlideManager.loadGalleyImage(image.context, image, item.img)
    }
}